package com.c.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.c.entity.CheckGroup;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * @author wangxiangli
 * @create 2022-12-28-20:46
 */
@Repository
public interface CheckGroupMapper extends BaseMapper<CheckGroup> {

    //设置检查组和检查项的多对多的关联关系
    void setCheckGroupAndCheckItem(Map<String, Integer> map);

    // 根据检查组ID查询关联的检查项ID
    List<Integer> findCheckItemIdsByCheckGroupId(Integer id);
    //依据检查组id删除旧的检查组和检查项的关联数据
    void deleteAssociation(Integer id);
    //校验检查组是否被套餐给引用(t_setmeal_checkgroup)
    long findCountByCheckGroupId(Integer id);
}
